package com.ax.ms.service.impl;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.ax.ms.service.PrintService;
import com.ax.ms.service.domain.Printer;

/**
 * Sample打印服务
 * 
 * @author xgl
 * @date 2017年5月10日
 *
 */
@Service
public class PrintServiceImpl implements PrintService {
	private final Logger logger = Logger.getLogger(getClass());

	@Override
	public Printer find(long code) {
		logger.info("Find printer by code=" + code);
		return new Printer(code, "find printer");
	}

	@Override
	public Printer create(long code, String name) {
		logger.info("Create printer by code=" + code + " name=" + name);
		return new Printer(code, "create printer");
	}

	@Override
	public Printer update(long code, String name) {
		logger.info("Update printer by code=" + code + " name=" + name);
		return new Printer(code, "update printer");
	}

	@Override
	public Printer remove(long code) {
		logger.info("Remove printer by code=" + code);
		return new Printer(code, "remove printer");
	}

}
